package com.example.demo.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloWorldController {
    @RequestMapping("/hello")
    public String hello() {
        ProxyService proxyService = new ProxyServiceImpl();
        ProxyProxy proxy = new ProxyProxy(proxyService);
        proxy.addUser();

        return "six six !hello啊啊 xuyuanfeng YAYAYAYAYAAY~" ;
    }

    public static void main(String[] args) {
        //静态代理模式
        ProxyService proxyService = new ProxyServiceImpl();
        ProxyProxy proxy = new ProxyProxy(proxyService);
        proxy.addUser();
    }
}
